/*
 * UnitBuilding.h
 *
 *  Created on: 2013-1-19
 *      Author: heqiu
 */

#ifndef UNITBUILDING_H_
#define UNITBUILDING_H_
#include "GuudPoint.h"
#include "GuudSurface.h"

namespace guud {
/*
 * 建筑物体有id 取值 [1,1000000]
 * 路没有id。一个点，就是一条路。必须相邻的路，才能行走。
 * 路的id取值
 * [1000001-1000010]
 */
//定义路的id
typedef enum {
	B_WAY_begin = 1000001, //开始
	B_WAY_1 = 1000001, //土路
	B_WAY_2 = 1000002, //砖路
	B_WAY_3 = 1000003, //高速路
	B_WAY_end = 1000010,	//结束
} GuudWayType;

class UnitBuilding {
public:
	static bool isWay(uint32_t uiId);

	UnitBuilding();
	void init(uint32_t uiXLen, uint32_t uiYLen);
	//设置 显示容器
	void setSurface(GuudSurface * pGuudSurface);

	GuudPoint m_stPos;	//相对于底层坐标的位置
	uint32_t m_iId;	//建筑标号
	uint32_t m_iType;	//建筑类别
	//建筑物占地面积
	uint32_t m_xLen;
	uint32_t m_yLen;

	GuudSurface * m_pGuudSurface;
	uint32_t m_uiDrawNo;	//绘图标号，用来避免重复绘图
	bool m_bShow;
};
}

#endif /* UNITBUILDING_H_ */
